#conding=utf-8
#分三步 获取cookie 写入cookie 判断是否携带cookie
import requests
import os

class get_cookie:
    def get_cookie_menthod(self,url):
        r=requests.get(url)
        return r.cookies
    
gc=get_cookie()
if __name__ =="__main__":
    cookie=gc.get_cookie_menthod("https://www.baidu.com")
    print("%s"%cookie.items())
    for key,value in cookie.items():
        print(key + "=" + value)